import com.adobe.cairngorm.control.CairngormEventDispatcher;

import net.optix.ip.events.GetFirmMattersEvent;
import net.optix.ip.model.ModelLocator;

import views.ViewInstance;
[Bindable]
private var model:ModelLocator	=	ModelLocator.getInstance();

private var _role:int;
public function set role(value:int):void
{
	_role	=	value;
	if(_role == 3)
	{
		this.visible	=	true;
	}
	else
	{
		this.visible	=	false;
	}
}

public function get role():int
{
	return _role;
}

private function showMatters():void
{
	
//	
//	if(model.view != ViewInstance.FirmMatters)
//	{
//		model.view	=	0;
//		model.view	=	ViewInstance.FirmMatters;
//	}
	
	var getFirmMatters:GetFirmMattersEvent	=	new GetFirmMattersEvent(model.firm.firmID);
	com.adobe.cairngorm.control.CairngormEventDispatcher.getInstance().dispatchEvent(getFirmMatters);
	
	model.actionView	=	0;
	model.actionView	=	ViewInstance.NewMatter;
}